package com.example.backed.dto;

import lombok.Data;
import jakarta.validation.constraints.*;

@Data
public class GroupBuyOrderCreateDTO {
    /**
     * 团购ID
     */
    @NotNull(message = "团购ID不能为空")
    private Long groupBuyId;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;

    /**
     * 收货地址
     */
    @NotBlank(message = "收货地址不能为空")
    private String address;

    /**
     * 收货人
     */
    @NotBlank(message = "收货人不能为空")
    private String receiver;

    /**
     * 收货人电话
     */
    @NotBlank(message = "收货人电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
} 